package org.example.mydeom.common;

import org.example.mydeom.pojo.entity.User;
import org.springframework.security.core.context.SecurityContextHolder;

public  class BaseContext {
    public static Long getCurrentId(){
        User user = (User)SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        return user.getId();
    }
}
